const userDao = require('../dao/userDao');

//增加用户
module.exports.insert = async function (user) {
    return await userDao.insert(user);
}

//根据ID查询用户
module.exports.findById = async function (id) {
    try {
        return await userDao.findById(id);
    } catch (e) {
        return {};
    }
}

//查询所有用户
module.exports.find = async function (searchObj, page) {
    return await userDao.find(searchObj, page);
}